using System;
using System.Web.Mvc;

using Azure.Domain.Models;

namespace Azure.Web.Models
{
    public class PostViewModel
    {
        public PostViewModel()
        {
        }

        public PostViewModel(Post post) : this()
        {
            Title = post.Title;
            Body = post.Body;
            Author = post.Author;
            Created = post.Created;
            Slug = post.Slug;
            Year = post.Year();
            Month = post.Month();
            Day = post.Day();
        }

        public string Title { get; set; }
        public string Body { get; set; }
        public string Author { get; set; }
        public DateTime Created { get; set; }
        public string Slug { get; set; }
        public int Year { get; set; }
        public int Month { get; set; }
        public int Day { get; set; }
        public string Link { get; set; }

    }
}